package com.quick.tim.mobileserviceprovider.entity;
// Generated 5 Jun, 2013 6:08:00 PM by Hibernate Tools 3.2.1.GA


import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TeacherStddivSub generated by hbm2java
 */
@Entity
@Table(name="teacher_stddiv_sub", schema="public"
)
public class TeacherStddivSub  implements java.io.Serializable {


     private TeacherStddivSubId id;
     private Std std;
     private UserMaster userMaster;
     private Sub sub;

    public TeacherStddivSub() {
    }

    public TeacherStddivSub(TeacherStddivSubId id, Std std, UserMaster userMaster, Sub sub) {
       this.id = id;
       this.std = std;
       this.userMaster = userMaster;
       this.sub = sub;
    }
   
     @EmbeddedId
    
    
    @AttributeOverrides( {
        @AttributeOverride(name="username", column=@Column(name="username", nullable=false, length=250) ), 
        @AttributeOverride(name="std", column=@Column(name="std", nullable=false, length=7) ), 
        @AttributeOverride(name="div", column=@Column(name="div", nullable=false, length=3) ), 
        @AttributeOverride(name="sub", column=@Column(name="sub", nullable=false, length=30) ) } )
    public TeacherStddivSubId getId() {
        return this.id;
    }
    
    public void setId(TeacherStddivSubId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="std", nullable=false, insertable=false, updatable=false)
    public Std getStd() {
        return this.std;
    }
    
    public void setStd(Std std) {
        this.std = std;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="username", nullable=false, insertable=false, updatable=false)
    public UserMaster getUserMaster() {
        return this.userMaster;
    }
    
    public void setUserMaster(UserMaster userMaster) {
        this.userMaster = userMaster;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="sub", nullable=false, insertable=false, updatable=false)
    public Sub getSub() {
        return this.sub;
    }
    
    public void setSub(Sub sub) {
        this.sub = sub;
    }




}


